<template>
  <div>
    <button @click="play">播放</button>
    <button @click="pause">暂停</button>
    <audio ref="audio" :src="audioSrc"></audio>
  </div>
</template>

<script>
export default {
  data() {
    return {
      audioSrc: 'https://shxt.gzxcbd.cn/static/ttsmaker-file-2024-6-29-0-17-2.mp3', // 替换为你的音频文件路径
    };
  },
  methods: {
    play() {
      this.$refs.audio.play();
    },
    pause() {
      this.$refs.audio.pause();
    },
  },
};
</script>